package com.gqz.defect.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gqz.common.core.domain.R;
import com.gqz.common.core.domain.RequestForm;
import com.gqz.defect.vo.*;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 消缺工单表
 */


//@RequestMapping("/en-defects-sheet")
@FeignClient(name = "bs-defects", contextId = "en-defects-sheet", path = "/en-defects-sheet")
public interface EnDefectsSheetApi {
    @PostMapping("/{id}")
    public R<List<EnDefectsSheetVo>> getById(
            @PathVariable("id") String id);

    @PostMapping("/page")
    public R<Page<EnDefectsSheetVo>> page(
            @RequestBody RequestForm<EnDefectsSheetVo> requestForm);

    @PostMapping("/count")
    public R<Long> count(
            @RequestBody RequestForm<EnDefectsSheetVo> requestForm);

    @PostMapping("/insert")
    public R<Integer> insert(
            @RequestBody EnDefectsSheetListVo vos);

    @PostMapping("/update")
    public R<Integer> update(
            @RequestBody EnDefectsSheetListVo vos);

    @PostMapping("/delete")
    public R<Integer> delete(
            @RequestBody List<String> ids);

    @PostMapping("/export/excel")
    public void exportExcel(
            @RequestParam("response") HttpServletResponse response,
            @RequestBody RequestForm<EnDefectsSheetVo> requestForm);

    @PostMapping("/getBySheetId")
    public R<List<EnDefectsSheetRelVo>> getBySheetId(
            @RequestParam String sheet_id);

    /**
     * 消缺工单表-派单
     *
     * @param vos 你
     * @return {@link R}<{@link Integer}>
     */
    @PostMapping("/pdSend")
    public R<Integer> pdSend(
            @RequestBody List<EnDefectsSheetVo> vos);

    /**
     * 消缺工单表-质量评价
     *
     * @param vos 你
     * @return {@link R}<{@link Integer}>
     */
    @PostMapping("/zlpjSend")
    public R<Integer> zlpjSend(
            @RequestBody EnDefectsSheetVo vos);

    /**
     * 消缺工单表-获取进度条信息
     *
     * @param sheet_id 工作表id
     * @return {@link R}<{@link List}<{@link TEnDefectsSheetOperateVo}>>
     */
    @PostMapping("/getProcessList")
    public R<List<TEnDefectsSheetOperateVo>> getBaseProcessList(
            @RequestParam String sheet_id);

    /**
     * 获取单据编号（新增）
     *
     * @return {@link R}<{@link Object}>
     */
    @PostMapping("/getDjbh")
    public R<Object> getDjbh();

    /**
     * 获取坐标
     *
     * @param startTime 开始时间
     * @param endTime   结束时间
     * @param yhid      yhid公司
     * @return {@link R}<{@link List}<{@link EnDefectsGisVo}>>
     */
    @PostMapping("/energyPtgis")
    public R<List<EnDefectsGisVo>> energyPtgis(
            @RequestParam("startTime") String startTime,
            @RequestParam("endTime") String endTime,
            @RequestParam("yhid") String yhid);

    /**
     * 获取工单统计数量
     *
     * @param sdate 日期
     * @param edate 埃达特
     * @return {@link List}<{@link EnTjVo}>
     */
    @RequestMapping(value = "/getGdStatusXx", method = RequestMethod.GET)
    public List<EnTjVo> getGdStatusXx(
            @RequestParam("sdate") String sdate,
            @RequestParam("edate") String edate);
}
